package com.loiot.commons.message.site;

import java.util.List;

import lombok.Setter;

import com.loiot.commons.message.MessageClient;
import com.loiot.commons.message.MessageVo;

public class SiteLetterClient implements MessageClient {

    /**
     * 站内信数据访问接口
     */
    @Setter
    private SiteLetterDao siteLetterDao;

    public void send(MessageVo vo) {
        SiteLetterVo siteLetterVo = (SiteLetterVo) vo;
        // 添加站内信
        siteLetterDao.addSiteLetter((SiteLetter) siteLetterVo);
    }

    public void send(List<MessageVo> list) {
        if (null != list && list.size() > 0) {
            for (MessageVo messageVo : list) {
                send(messageVo);
            }
        }
    }

}
